Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: print test errors only when finished #56351

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Llorx
Copy link
Contributor

@Llorx Llorx commented Dec 24, 2024

Fixes #56316

TODO: Add/modify tests (will do later, just pushing this to validate that this is the way to go for changes like this).

I just added a flag to make a conditional output. Is this the usual way to go with NodeJS @pmarchini ?

About the feature, I'm not sure if everyone will like it like this. Maybe add an opt-in flag to format the errors before the report has finished? (like it was before, but now is opt-in). Or maybe don't add a flag now, and maybe add the opt-in flag later if we receive complaints?

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/test_runner

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. test_runner Issues and PRs related to the test runner subsystem. labels Dec 24, 2024
Copy link

codecov bot commented Jan 2, 2025

Codecov Report

Attention: Patch coverage is 88.88889% with 1 line in your changes missing coverage. Please review.

Project coverage is 88.54%. Comparing base (be9dc2d) to head (ce5c8c0).
Report is 33 commits behind head on main.

Files with missing lines Patch % Lines
lib/internal/test_runner/reporter/utils.js 87.50% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main   #56351   +/-   ##
=======================================
  Coverage   88.54%   88.54%           
=======================================
  Files         657      657           
  Lines      190350   190353    +3     
  Branches    36545    36554    +9     
=======================================
+ Hits       168536   168549   +13     
- Misses      14992    14999    +7     
+ Partials     6822     6805   -17     
Files with missing lines Coverage Δ
lib/internal/test_runner/reporter/spec.js 96.19% <100.00%> (ø)
lib/internal/test_runner/reporter/utils.js 94.68% <87.50%> (-2.03%) ⬇️

... and 36 files with indirect coverage changes

@cjihrig
Copy link
Contributor

cjihrig commented Jan 3, 2025

About the feature, I'm not sure if everyone will like it like this. Maybe add an opt-in flag to format the errors before the report has finished? (like it was before, but now is opt-in). Or maybe don't add a flag now, and maybe add the opt-in flag later if we receive complaints?

It's possible for anyone to write their own reporter to make it look exactly how they want. There are already a number of reporters available on npm, and one potentially in the works for node core. We also don't make semver guarantees about exact reporter formatting.

Can you update the tests so that this doesn't get stalled out.

@cjihrig
Copy link
Contributor

cjihrig commented Jan 15, 2025

ping @Llorx. Are you still working on this? If not, can we close this PR out? I'd like to see this issue get resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-ci PRs that need a full CI run. test_runner Issues and PRs related to the test runner subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Only print failing assertion once with spec reporter
3 participants